//
//  SampleView.m
//  zctx
//
//  Created by apple on 15/12/15.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import "SampleView.h"

@implementation SampleView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        
        // 缩放最大的比例
        self.maximumZoomScale = 3.0;
        // 缩放最小的比例
        self.minimumZoomScale = 0.2;
        
        _imageView = [[UIImageView alloc]initWithFrame:[self bounds]];
        [self addSubview:_imageView];
        
        self.delegate = self;
        
    }
    return self;
}

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
    
    return _imageView;
}

@end
